import request from "@/utils/request"

export interface QueryFeedbackListParams extends PaginationParams {
  /** 场站 id */
  stubGroupId?: string
  /** 场站名称 */
  title?: string
  /** 设备 id */
  stubId?: string
  /** 订单 id */
  orderId?: string
  /** 用户 id */
  userId?: string
}
export enum FeedbackStatus {
  未处理 = 1,
  已处理 = 2,
}
export interface Feedback {
  id: number
  createTime: number
  /** 图片，逗号分隔 */
  imgs: string
  orderId: string
  stubId: string
  stationId: string
  stationName: string
  managerPhone:string
  /** 选择的理由 */
  reason: string
  /** 填写的其他理由 */
  otherInfo: string
  nickname: string
  telephone: string
  status: FeedbackStatus
  /** 处理备注 */
  commend: string
}
export async function queryFeedbackList(params: QueryFeedbackListParams) {
  return request<Feedback[]>('/app/manager/errorApply/list', {
    data: params,
  })
}
export async function dealFeedback(params: {
  infoId: number;
  commend?: string;
}) {
  return request('/app/manager/errorApply/excuse', {
    data: params,
  })
}
